version: '3'

services:
  jbpmn:
    image: jboss/jbpm-server-full
    ports:
      - "8080:8080"
    environment:
      - POSTGRES_DB=your_database_name
      - POSTGRES_USER=your_database_user
      - POSTGRES_PASSWORD=your_database_password
    depends_on:
      - postgres

  nginx:
    image: nginx
    ports:
      - "80:80"
    depends_on:
      - jbpmn
      - grafana

  postgres:
    image: postgres
    environment:
      POSTGRES_USER: postgres_user
      POSTGRES_PASSWORD: postgres_password
      POSTGRES_DB: postgres_database

  prom:
    image: prom/prometheus
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
    depends_on:
      - node-exporter
      
  grafana:
    image: grafana/grafana
    ports:
      - "3000:3000"
    depends_on:
      - prom
    environment:
      - GF_SECURITY_ADMIN_PASSWORD=admin_password
    volumes:
      - ./grafana/provisioning:/etc/grafana/provisioning
      - ./grafana/dashboards:/var/lib/grafana/dashboards

  node-exporter:
    image: prom/node-exporter
    ports:
      - "9100:9100"
